package com.wwl.base.common.excel.document;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;

import java.io.IOException;
import java.io.InputStream;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/2/8 11:24
 * @description:
 */
public class XlsDocumentFactory implements DocumentFactory{
    @Override
    public Workbook getReadableWorkbook(InputStream stream) throws IOException {
        return new HSSFWorkbook(stream);
    }

    @Override
    public Workbook getWriteableWorkbook() {
        return new HSSFWorkbook();
    }
}
